package sds.group;

import java.util.HashMap;

import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.net.Uri;
import android.provider.ContactsContract;
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.util.Log;

public class ClientDb extends SQLiteOpenHelper {
	private static HashMap<String, String> contactList;
	
	public ClientDb (Context context) {
		super(context, "Client5.db", null, 1);
	}
	
	public void onCreate(SQLiteDatabase db) {
		db.execSQL("CREATE TABLE groupInfo(_id INTEGER PRIMARY KEY AUTOINCREMENT, " +
				"" + "groupName TEXT, groupDepth INTEGER );");
		db.execSQL("CREATE TABLE groupUserInfo(_id INTEGER PRIMARY KEY AUTOINCREMENT, "
				+ "groupInfo_inx INTEGER, userName TEXT, userPhone TEXT, userSelected TEXT );");
		db.execSQL("CREATE TABLE selectedGroup(_id INTEGER PRIMARY KEY AUTOINCREMENT, "
				+ "groupInfo_inx INTEGER, selectedTime TEXT, appointmentExplain TEXT, userName TEXT" +
						", userPhone );");
	}
		 
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		db.execSQL("DROP TABLE IF EXISTS product");
		onCreate(db);	  
	}
	

	
}
